<%@ page language="java" import="java.util.*"
    pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%
	String path = request.getContextPath();
	String basePath = request.getScheme() + "://"
			+ request.getServerName() + ":" + request.getServerPort()
			+ path + "/";
%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<base href="<%=basePath%>">

<title>displayStuInfo.jsp</title>
</head>
<jsp:include page="isLogin.jsp"></jsp:include>
<body>
	<table>
		<tr>
			<td>id</td>
			<td>昵称</td>
			<td>真实姓名</td>
			<td>性别</td>
			<td>出生日期</td>
			<td>所在专业</td>
			<td>所选课程</td>
			<td>兴趣</td>
			<td>备注</td>
			<td></td>
		</tr>
		
		<c:forEach items="${stus}" var="stu">
			<tr>
				<td>${stu.id}</td>
				<td>${stu.truename}</td>
				<td>${stu.nicheng}</td>
				<td>
					<c:if test="${stu.sex == 1 }">男</c:if>
					<c:if test="${stu.sex == 0 }">女</c:if>
				</td>
				<td>${stu.birthday}</td>
				<td>${stu.major}</td>
				<td>${stu.course}</td>
				<td>${stu.interest}</td>
				<td>${stu.remark}</td>
				<td><a href="student/deleteStuServlet?id=${stu.id}">删除</a></td>
			</tr>
		</c:forEach>
	</table>
	
</body>
</html>